﻿using System;
using System.Globalization;
using System.Windows.Data;
using StockholmsStad.Runtime.Serialization.DataContract.Enums;

namespace StockholmsStad.Windows.UI.Infrastructure.Converters
{
    public class MarriageCertificateTypeToStringConverter : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is MarriageCertificateType)
            {
                var role = (MarriageCertificateType)value;

                if (role == MarriageCertificateType.Wedding)
                    return "Vigsel";

            }
            
            return string.Empty;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
                return string.Empty;

            return value as string;
        }

        #endregion
    }

}
